﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SharpML.Gui.Controls
{
    public partial class PatternDataVisualizer : UserControl
    {
        public Api.Abstraction.Plugin.IPatternDataAdaptor Adaptor { get; set; }

        public PatternDataVisualizer()
        {
            InitializeComponent();

            // Double buffer
            SetStyle( ControlStyles.DoubleBuffer, true );
        }

        private void DataVisualizer_Load( object sender, EventArgs e )
        {

        }

        protected override void OnPaint( PaintEventArgs e )
        {
            // Chain to base (paints background)
            base.OnPaint( e );

            // Localize
            var adaptor = Adaptor;
            var gfx = e.Graphics;

            if( Adaptor == null )
                gfx.Clear( Color.DarkGray );
            else
            {
                gfx.Clear( SystemColors.Control );
                //foreach( var item in adaptor.Items )
            }

        }

    }
}
